<html>
    <body>
        <p><b>stackDepth:</b> <span id="callstack"></span></p>
        <script>
            var element = document.getElementById('callstack');
            var depth = 0;
            var recur = function () {
                element.innerHTML = ++depth;
                recur();
            };
            recur();
        </script>
    </body>
</html>
